// Helpers

// Generic

* {
  outline: none;
}

// Close button

.close {
  &:active,
  &:focus {
    outline: none;
  }
}

a {
  transition: color 0.2s;
}

.z-over {
  position: relative;
  z-index: 25;
}

.left-0 {
  left: 0 !important;
}

.z-below {
  z-index: 4;
  position: relative;
}

.pulse-animation {
  transition: $transition-base;
  transform: scale(1.1);
  animation: pulse 1s infinite;
}

@keyframes pulse {
  0% {
    transform: scale(0.75);
  }
  20% {
    transform: scale(1.1);
  }
  40% {
    transform: scale(0.75);
  }
  60% {
    transform: scale(1.05);
  }
  80% {
    transform: scale(0.75);
  }
  100% {
    transform: scale(0.75);
  }
}

// Border radius

.br-tl {
  border-top-left-radius: $border-radius-sm !important;
}

.br-tr {
  border-top-right-radius: $border-radius-sm !important;
}

.br-bl {
  border-bottom-left-radius: $border-radius-sm !important;
}

.br-br {
  border-bottom-right-radius: $border-radius-sm !important;
}

body {
  .bl-0 {
    border-top-left-radius: 0 !important;
    border-bottom-left-radius: 0 !important;
  }

  .br-0 {
    border-top-right-radius: 0 !important;
    border-bottom-right-radius: 0 !important;
  }
}

body {
  @include media-breakpoint-up(lg) {
    .br-lg-right-0 {
      @include border-right-radius(0 !important);
    }

    .br-lg-left-0 {
      @include border-left-radius(0 !important);
    }
  }

  @include media-breakpoint-up(xl) {
    .br-xl-right-0 {
      @include border-right-radius(0 !important);
    }

    .br-xl-left-0 {
      @include border-left-radius(0 !important);
    }
  }
}

.progress-constrained {
  box-sizing: content-box;
}

// Opacity

@for $o from 1 through 9 {
  .opacity-#{$o} {
    opacity: $o / 10 !important;
  }
}

// Sizing

$num: 20;
@while $num < 150 {
  .d-#{$num} {
    height: $num + 0px !important;
    line-height: $num + 0px !important;
    width: $num + 0px !important;
  }
  $num: $num + 10;
}

// Line height

.line-height-sm {
  line-height: 1.3;
}

.line-height-md {
  line-height: 2;
}

.line-height-1 {
  line-height: 1 !important;
}

.line-height-normal {
  line-height: normal;
}

.text-indent-0 {
  text-indent: 0 !important;
}

// Height

.h-auto {
  height: auto;
}

.h-100 {
  height: 100%;
}

.h-180px {
  height: 180px;
}

.h-240px {
  height: 240px;
}

.h-280px {
  height: 280px;
}

.h-320px {
  height: 320px;
}

// Width

.w-auto {
  width: auto;
}

.w-43 {
  width: 43%;
}

.w-50 {
  @include media-breakpoint-up(md) {
    min-width: 50%;
    width: 50%;
  }
}

@include media-breakpoint-down(sm) {
  body {
    .w-50 {
      width: 100% !important;
    }
  }
}

.max-w-70 {
  max-width: 70%;
}

// Divider

.divider {
  background: $border-color;
  height: 1px;
  overflow: hidden;
}

// Border

.border-1 {
  border-width: 1px !important;
  border-style: solid !important;
}

.border-2 {
  border-width: 2px !important;
  border-style: solid !important;
}

.border-3 {
  border-width: 3px !important;
  border-style: solid !important;
}

// Font size

.font-size-xs {
  font-size: $font-size-xs / 1.2 !important;
}

.font-size-sm {
  font-size: $font-size-sm !important;
}

.font-size-md {
  font-size: $font-size-base !important;
}

.font-size-lg {
  font-size: $font-size-lg !important;
}

.font-size-xl {
  font-size: $font-size-lg * 1.1 !important;
}

.font-size-xxl {
  font-size: $font-size-lg * 1.2 !important;
}

// Composed backgrounds

%composed-bg {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
  width: 100%;
  z-index: 3;
  opacity: 0.15;
}

.bg-composed-wrapper {
  position: relative;
  @include border-top-radius(inherit);
  display: flex;
  align-items: center;

  &--image {
    filter: grayscale(80%);
    background-size: cover;
    @include border-top-radius(inherit);
    @extend %composed-bg;
  }

  &--content {
    position: relative;
    z-index: 7;
    width: 100%;
  }

  &--bg {
    @extend %composed-bg;
    z-index: 5;
  }
}

.bg-composed-filter-rm {
  filter: grayscale(0%);
}

.bg-repeat {
  background-size: auto;
}

.bg-filter-grayscale {
  filter: grayscale(100%);
}

.transition-base {
  transition: $transition-base !important;
}

// Shadow

.shadow-xxl {
  box-shadow: $box-shadow-xxl !important;
}

.shadow-sm-dark {
  box-shadow: $box-shadow-sm-dark !important;
}

// Background white 50%

.bg-white-50 {
  background-color: transparentize($white, 0.8);
}

// Text dark

.text-black {
  color: $black;
}

//cursor

.cursor-pointer {
  cursor: pointer;
}

//without radius overrides

.without-radius {
  border-radius: 0 !important;
}

//Dashboard Costomize cards
.width-102 {
  width: 102% !important;
}

.gray-variant {
  background-color: gray !important;
}
// Images

.img-fit-container {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

// Gradient Icons

.gradient-icon {
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

// Blockquote

.blockquote {
  font-family: $font-family-monospace;
}

// Position

.p-top-a {
  top: auto !important;
}
.pos-r {
  left: auto;
  right: 0;
}

.hover-scale-sm {
  transition: $transition-base !important;
  transform: scale(1) !important;

  &:hover {
    transform: scale(1.08) !important;
  }
}

.hover-scale-rounded {
  transition: $transition-base !important;
  transform: scale(1) !important;
  box-shadow: none;

  &:hover {
    @include border-radius($border-radius !important);
    transform: scale(1.08) !important;
    box-shadow: $box-shadow-sm-light;
  }
}

.hover-scale-lg {
  transition: $transition-base !important;
  transform: scale(1) !important;

  &:hover {
    transform: scale(1.12) !important;
  }
}

@include media-breakpoint-up(lg) {
  .object-skew {
    transform: scale(0.95) perspective(924px) rotateY(-8deg) rotateX(9deg)
      rotate(3deg) !important;
  }
}

// Responsive rounded

@include media-breakpoint-down(xl) {
  .rounded-right,
  .rounded-left {
    border-radius: 0 !important;
  }
}

.d-44 {
  height: 44px;
  line-height: 44px;
  width: 44px;
}

.nav-link {
  cursor: pointer;
}
